//
//  RBRefreshHeader.m
//  Budejie
//
//  Created by 华杨科技 on 2017/11/2.
//  Copyright © 2017年 饶波. All rights reserved.
//

#import "RBRefreshHeader.h"

@interface RBRefreshHeader()
/**公司logo */
@property (nonatomic, strong) UIImageView *logoImgV;
@end
@implementation RBRefreshHeader
/**
 自定义子控件
 */
- (void)prepare{
    [super prepare];
    
    self.automaticallyChangeAlpha = YES;
    self.lastUpdatedTimeLabel.textColor = [UIColor orangeColor];
    //    mj_header.stateLabel.hidden =YES;
    [self setTitle:@"赶紧下拉吧ooxx" forState:(MJRefreshStateIdle)];
    [self setTitle:@"松开可以刷新ooxx" forState:MJRefreshStatePulling];
    [self setTitle:@"正在刷新中...ooxx" forState:MJRefreshStateRefreshing];
    
    [self addSubview:[[UISwitch alloc] init]];
    
    // 添加logo
    UIImageView *logoImgView = [[UIImageView alloc] init];
    logoImgView.image = [UIImage imageNamed:@"logo.png"];
    [self addSubview:logoImgView];
    self.logoImgV = logoImgView; 
}

/**摆放子控件*/
- (void)placeSubviews {
    [super placeSubviews];
        
    self.logoImgV.rb_width = self.rb_width;
    self.logoImgV.rb_height = 50;
    self.logoImgV.rb_x = 0;
    self.logoImgV.rb_y = -50;
}
@end
